import axios from '@/utils/axios';
// 重置密码
export const resetPassword = (data) => {
    return axios.request({
        url: '/resetPwd',
        method: 'put',
        data
    });
};

export const updatePassword = (data) => {
    return axios.request({
        url: '/updatePwd',
        method: 'put',
        data
    });
};

// 发送验证码接口
export const sendEmail = (params) => {
    return axios.request({
        url: '/sendEmail',
        method: 'Get',
        params
    });
};

export const register = (data) => {
    return axios.request({
        url: '/register',
        method: 'post',
        data
    });
};

export const login = (data) => {
    return axios.request({
        url: '/login',
        method: 'post',
        data
    });
};

export const getInfo = () => {
    return axios.request({
        url: '/user-info',
        method: 'get'
    });
};

export const getMenus = (id) => {
    return axios.request({
        url: '/user-menu',
        method: 'get',
        params: {siteId: id}
    });
};
